<template>
  <div>
    <span v-for="(item, index) in array" :key="index">
      <input type="checkbox" :value="item" v-model="and_array" />
      {{ item }}
    </span>
    <hr />
    累加值为：{{ and }}
  </div>
</template>

<script>
export default {
  data() {
    return {
      array: [9, 15, 19, 25, 29, 31, 48, 57, 62, 79, 87],
      and_array: [],
    };
  },
  computed: {
    and() {
      return this.and_array.reduce((and, and_array) => (and += and_array),0);
    },
  },
};
</script>

<style>
li {
  list-style: none;
}
</style>